package com.andy.springboot.dto;

/**
 * 请求响应编码
 * @author Andy.ye
 * @date 2018年3月23日 下午3:29:08
 */
public enum ReturnCode {
	SUCCESS("200", "success"),

	// 业务相关错误码（500-10000）
	UNKNOWN("500", "系统繁忙,请稍后再试"), TOKEN_INVALID("100001", "Token失效"), SIGNATURE_ERROR("100002", "签名验证失效"),

	// 业务参数
	PARAM_ERROR("1011", "非法参数"), MISS_REQUIRED_PARAM("1012", "miss required param %s");

	private String code;
	private String message;

	private ReturnCode(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public ReturnCode setCode(String code) {
		this.code = code;
		return this;
	}

	public String getMessage() {
		return message;
	}

	public ReturnCode setMessage(String message) {
		this.message = message;
		return this;
	}
}
